﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="HotelRegister.aspx.cs" Inherits="LoginPage_HotelRegitser" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="AgentRegister.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            left:10%;
            width: 60% auto;
        }
        .style2
        {
            text-align: left;
        }
        .style3
        {
            text-align: left;
            width: 93px;
            font-weight: 700;
        }
        .style4
        {
            text-align: center;
        }
        .style5
        {
            text-align: left;
            width: 173px;
        }
        .style7
        {
            text-align: center;
            width: 226px;
        }
        .style8
        {
            text-align: left;
            width: 226px;
        }
        .style9
        {
            text-align: left;
        }
        .style10
        {
            text-align: left;
            width: 93px;
            font-weight: 700;
            height: 192px;
        }
    </style>
    <link href="HotelRegister.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
        
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        
        <div id="head">
         
            <div>
                <asp:HyperLink ID="HyperLink1" runat="server" Font-Size="22pt" 
               ForeColor="#3399FF" NavigateUrl="~/LoginPage/login.aspx">SRUB</asp:HyperLink>
                
            </div>
              
            	<div id="title">
                    <asp:Label ID="Label1" runat="server" Text="注册宾馆信息" Font-Size="22pt" 
                ForeColor="#3399FF"></asp:Label></div> 
           
            
         </div>

       <div id="content">
        <div id="content_left">


            <table class="style1">
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label_name" runat="server" Text="姓名"></asp:Label>
                        <asp:Label ID="Label3" runat="server" ForeColor="Red" Text="*"></asp:Label>
                    </td>
                    <td class="style8">
                        <asp:TextBox ID="TextBox_name" runat="server" Width="80%"></asp:TextBox>
                    </td>
                    <td class="style2">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label_sex" runat="server" Text="性别"></asp:Label>
                        <asp:Label ID="Label4" runat="server" ForeColor="Red" Text="*"></asp:Label>
                    </td>
                    <td class="style8">
                        <asp:RadioButton ID="RadioButton_male" runat="server" Checked="True" 
                            GroupName="sex" Text="男" />
                        <asp:RadioButton ID="RadioButton_female" runat="server" GroupName="sex" 
                            Text="女" />
                    </td>
                    <td class="style2">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label_birthday" runat="server" Text="出生日期"></asp:Label>
                        <asp:Label ID="Label5" runat="server" ForeColor="Red" Text="*"></asp:Label>
                    </td>
                    <td class="style8">
                        <asp:TextBox ID="TextBox_birthday" runat="server" Width="80%"></asp:TextBox>
                        <asp:Button ID="Button_more" runat="server" Height="21px" Text="&gt;" 
                            onclick="Button_more_Click" style="width: 21px" />
                    </td>
                    <td class="style2">
                        <asp:Label ID="Label_birtdday_note" runat="server" ForeColor="Red" Text="日期有误！" 
                            Visible="False"></asp:Label>
                        <asp:Calendar ID="Calendar1" runat="server" BackColor="White" 
                            BorderColor="White" BorderStyle="None" CellSpacing="1" Font-Names="Verdana" 
                            Font-Size="10pt" ForeColor="White" Height="250px" NextPrevFormat="ShortMonth" 
                            Width="330px" Visible="False" 
                            onselectionchanged="Calendar1_SelectionChanged">
                            <DayHeaderStyle Font-Bold="True" Font-Size="8pt" ForeColor="#3399FF" 
                                Height="8pt" Font-Names="Bell MT" />
                            <DayStyle BackColor="#CCCCCC" />
                            <NextPrevStyle Font-Bold="True" Font-Size="8pt" ForeColor="White" />
                            <OtherMonthDayStyle ForeColor="#999999" />
                            <SelectedDayStyle BackColor="#333399" ForeColor="White" />
                            <TitleStyle BackColor="#3399FF" BorderStyle="None" Font-Bold="True" 
                                Font-Size="12pt" ForeColor="White" Height="12pt" />
                            <TodayDayStyle BackColor="#999999" ForeColor="White" />
                        </asp:Calendar>
                    </td>
                </tr>
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label_IDCard" runat="server" Text="身份证号"></asp:Label>
                        <asp:Label ID="Label6" runat="server" ForeColor="Red" Text="*"></asp:Label>
                    </td>
                    <td class="style8">
                        <asp:TextBox ID="TextBox_IDCard" runat="server" Width="80%"></asp:TextBox>
                    </td>
                    <td class="style2">
                        <asp:Label ID="Label_idcard_note" runat="server" BorderColor="Red" 
                            ForeColor="Red" Text="Label" Visible="False"></asp:Label>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator_idcard" 
                            runat="server" ControlToValidate="TextBox_IDCard" ErrorMessage="身份证格式错误！" 
                            ForeColor="Red" ValidationExpression="\d{17}[\d|X]|\d{15}"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label_name3" runat="server" Text="宾馆地址"></asp:Label>
                        <asp:Label ID="Label7" runat="server" ForeColor="Red" Text="*"></asp:Label>
                    </td>
                    <td class="style8" rowspan="2">
                         <ContentTemplate>
                        <table class="style1">
                            <tr>
                                <td class="style5">
                                    <asp:Label ID="Label11" runat="server" Text="省份:  "></asp:Label>
                                    <asp:DropDownList ID="DropDownList_pro" runat="server" AutoPostBack="True" 
                                        DataSourceID="SqlDataSource_province" DataTextField="province" 
                                        DataValueField="ProID" Width="80%">
                                    </asp:DropDownList>
                                    <asp:SqlDataSource ID="SqlDataSource_province" runat="server" 
                                        ConnectionString="<%$ ConnectionStrings:ConnString %>" 
                                        SelectCommand="SELECT DISTINCT [ProID], [province] FROM [ProvinceTable]">
                                    </asp:SqlDataSource>
                                </td>
                            </tr>
                            <tr>
                                <td class="style5">
                                    <asp:Label ID="Label12" runat="server" Text="城市:  "></asp:Label>
                                    <asp:DropDownList ID="DropDownList_city" runat="server" AutoPostBack="True" 
                                        DataSourceID="SqlDataSource_city" DataTextField="city" 
                                        DataValueField="CityID" Width="80%">
                                    </asp:DropDownList>
                                    <asp:SqlDataSource ID="SqlDataSource_city" runat="server" 
                                        ConnectionString="<%$ ConnectionStrings:ConnString %>" 
                                        SelectCommand="SELECT DISTINCT [CityID], [city] FROM [CityTable] WHERE ([ProID] = @ProID)">
                                        <SelectParameters>
                                            <asp:ControlParameter ControlID="DropDownList_pro" DefaultValue="0" 
                                                Name="ProID" PropertyName="SelectedValue" Type="Int32" />
                                        </SelectParameters>
                                    </asp:SqlDataSource>
                                </td>
                            </tr>
                            <tr>
                                <td class="style5">
                                    <asp:Label ID="Label13" runat="server" Text="县区:  "></asp:Label>
                                    <asp:DropDownList ID="DropDownList_county" runat="server" 
                                        DataSourceID="SqlDataSource_county" DataTextField="county" 
                                        DataValueField="CountyId" Width="80%" AutoPostBack="True">
                                    </asp:DropDownList>
                                    <asp:SqlDataSource ID="SqlDataSource_county" runat="server" 
                                        ConnectionString="<%$ ConnectionStrings:ConnString %>" 
                                        SelectCommand="SELECT DISTINCT [county], [CountyId] FROM [CountyTable] WHERE ([CityID] = @CityID)">
                                        <SelectParameters>
                                            <asp:ControlParameter ControlID="DropDownList_city" DefaultValue="1" 
                                                Name="CityID" PropertyName="SelectedValue" Type="Int32" />
                                        </SelectParameters>
                                    </asp:SqlDataSource>
                                </td>
                            </tr>
                           
                            <tr>
                                <td class="style5">
                                    <asp:Label ID="Label14" runat="server" Text="具体地址:  "></asp:Label>
                                    <asp:TextBox ID="TextBox_address" runat="server" Width="100%"></asp:TextBox>
                        <asp:Label ID="Label_hoteladdress_note" runat="server" ForeColor="#FF3300" 
                            Text="地址不能为空！" Visible="False"></asp:Label>
                                </td>
                            </tr>
                           
                        </table>
                         </ContentTemplate>
                    </td>
                    <td class="style4" rowspan="2">
                        
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style10">
                        </td>
                </tr>
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label_name6" runat="server" Text="宾馆名称"></asp:Label>
                        <asp:Label ID="Label16" runat="server" ForeColor="Red" Text="*"></asp:Label>
                    </td>
                    <td class="style8">
                        <asp:TextBox ID="TextBox_hotelname" runat="server" Width="80%"></asp:TextBox>
                    </td>
                    <td class="style2">
                        <asp:Label ID="Label_hotelname_note" runat="server" ForeColor="#FF3300" 
                            Text="宾馆已被注册！" Visible="False"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label_name5" runat="server" Text="联系电话"></asp:Label>
                        <asp:Label ID="Label15" runat="server" ForeColor="Red" Text="*"></asp:Label>
                    </td>
                    <td class="style8">
                        <asp:TextBox ID="TextBox_phone" runat="server" Width="80%"></asp:TextBox>
                    </td>
                    <td class="style2">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label_name4" runat="server" Text="账号"></asp:Label>
                        <asp:Label ID="Label8" runat="server" ForeColor="Red" Text="*"></asp:Label>
                    </td>
                    <td class="style8">
                        <asp:TextBox ID="TextBox_account" runat="server" Width="80%" 
                            ontextchanged="TextBox_account_TextChanged"></asp:TextBox>
                    </td>
                    <td class="style9">
                        <asp:Label ID="Label_account_note" runat="server" ForeColor="#FF0066" 
                            Visible="False"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label_psw1" runat="server" Text="密码"></asp:Label>
                        <asp:Label ID="Label9" runat="server" ForeColor="Red" Text="*"></asp:Label>
                    </td>
                    <td class="style8">
                        <asp:TextBox ID="TextBox_psw1" runat="server" Width="80%" TextMode="Password"></asp:TextBox>
                    </td>
                    <td class="style9">
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                            ErrorMessage="密码长度为6~16！" ForeColor="#FF3300" 
                            ValidationExpression="\w{6,16}" ControlToValidate="TextBox_psw1"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label_psw2" runat="server" Text="确认密码"></asp:Label>
                        <asp:Label ID="Label10" runat="server" ForeColor="Red" Text="*"></asp:Label>
                    </td>
                    <td class="style8">
                        <asp:TextBox ID="TextBox_psw2" runat="server" Width="80%" TextMode="Password"></asp:TextBox>
                    </td>
                    <td class="style9">
                        <asp:CompareValidator ID="CompareValidator1" runat="server" 
                            ControlToCompare="TextBox_psw1" ControlToValidate="TextBox_psw2" 
                            ErrorMessage="两次密码不一致！" ForeColor="#FF3300"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style3">
                        &nbsp;</td>
                    <td class="style7">
                        &nbsp;</td>
                    <td class="style9">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style3">
                        &nbsp;</td>
                    <td class="style7">
                        <asp:Button ID="Button_regitser" runat="server" Text="注册" BackColor="#3399FF" 
                            BorderStyle="None" Font-Size="14pt" ForeColor="White" Height="100%" 
                            Width="80%" onclick="Button_regitser_Click"  />
                    </td>
                    <td class="style9">
                        &nbsp;</td>
                </tr>
            </table>


        </div>
            
       </div>
    </form>
</body>
</html>

